package org.dftproject.genesis.ui.pages.pedigree.zoom;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Color;

public class ZoomKnobFigure extends Figure {
	
	public static final Color backgroundColor = ColorConstants.listBackground;
	public static final Color borderColor = new Color(null, 128, 128, 128);
	
	@Override
	public void paint(Graphics graphics) {		
		Rectangle bounds = getBounds();

		graphics.setBackgroundColor(backgroundColor);
		graphics.fillRoundRectangle(new Rectangle(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1), 6, 6);
		
		graphics.setForegroundColor(borderColor);
		graphics.drawRoundRectangle(new Rectangle(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1), 6, 6);

		super.paint(graphics);
	}

}
